<!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Transitional//EN"
  "http://www.w3.org/TR/xhtml1/DTD/xhtml1-transitional.dtd">

<html xmlns="http://www.w3.org/1999/xhtml">
  <head>
    <meta http-equiv="Content-Type" content="text/html; charset=utf-8" />
    
    <title>tests &mdash; GOZERWAVE v0.1 BETA documentation</title>
    <link rel="stylesheet" href="../_static/default.css" type="text/css" />
    <link rel="stylesheet" href="../_static/pygments.css" type="text/css" />
    <script type="text/javascript">
      var DOCUMENTATION_OPTIONS = {
        URL_ROOT:    '../',
        VERSION:     '0.1 BETA',
        COLLAPSE_MODINDEX: false,
        FILE_SUFFIX: '.html',
        HAS_SOURCE:  true
      };
    </script>
    <script type="text/javascript" src="../_static/jquery.js"></script>
    <script type="text/javascript" src="../_static/doctools.js"></script>
    <link rel="top" title="GOZERWAVE v0.1 BETA documentation" href="../index.html" />
    <link rel="next" title="users" href="users.html" />
    <link rel="prev" title="plugins" href="plugins.html" /> 
  </head>
  <body>
    <div class="related">
      <h3>Navigation</h3>
      <ul>
        <li class="right" style="margin-right: 10px">
          <a href="../genindex.html" title="General Index"
             accesskey="I">index</a></li>
        <li class="right" >
          <a href="../modindex.html" title="Global Module Index"
             accesskey="M">modules</a> |</li>
        <li class="right" >
          <a href="users.html" title="users"
             accesskey="N">next</a> |</li>
        <li class="right" >
          <a href="plugins.html" title="plugins"
             accesskey="P">previous</a> |</li>
        <li><a href="../index.html">GOZERWAVE v0.1 BETA documentation</a> &raquo;</li> 
      </ul>
    </div>  

    <div class="document">
      <div class="documentwrapper">
        <div class="bodywrapper">
          <div class="body">
            
  <div class="section" id="tests">
<h1>tests<a class="headerlink" href="#tests" title="Permalink to this headline">¶</a></h1>
<div class="section" id="module-gozerlib.tests">
<h2>description<a class="headerlink" href="#module-gozerlib.tests" title="Permalink to this headline">¶</a></h2>
<p>gozerwave tests framework.  NOT USED RIGHT NOW !!</p>
<dl class="class">
<dt id="gozerlib.tests.Test">
<em class="property">class </em><tt class="descclassname">gozerlib.tests.</tt><tt class="descname">Test</tt><big>(</big><em>execstring=''</em>, <em>expect=''</em>, <em>descr=''</em>, <em>where=''</em>, <em>fakein=''</em><big>)</big><a class="headerlink" href="#gozerlib.tests.Test" title="Permalink to this definition">¶</a></dt>
<dd><p>Bases: <a title="(in Python v2.7)" class="reference external" href="http://docs.python.org/dev/library/functions.html#object"><tt class="xref docutils literal"><span class="pre">object</span></tt></a></p>
<p>a test object.</p>
<dl class="method">
<dt id="gozerlib.tests.Test.begin">
<tt class="descname">begin</tt><big>(</big><big>)</big><a class="headerlink" href="#gozerlib.tests.Test.begin" title="Permalink to this definition">¶</a></dt>
<dd></dd></dl>

<dl class="method">
<dt id="gozerlib.tests.Test.run">
<tt class="descname">run</tt><big>(</big><em>bot</em>, <em>event</em><big>)</big><a class="headerlink" href="#gozerlib.tests.Test.run" title="Permalink to this definition">¶</a></dt>
<dd>run the test on bot with event.</dd></dl>

</dd></dl>

<dl class="class">
<dt id="gozerlib.tests.Tests">
<em class="property">class </em><tt class="descclassname">gozerlib.tests.</tt><tt class="descname">Tests</tt><a class="headerlink" href="#gozerlib.tests.Tests" title="Permalink to this definition">¶</a></dt>
<dd><p>Bases: <a title="(in Python v2.7)" class="reference external" href="http://docs.python.org/dev/library/functions.html#object"><tt class="xref docutils literal"><span class="pre">object</span></tt></a></p>
<p>collection of all tests.</p>
<dl class="method">
<dt id="gozerlib.tests.Tests.activate">
<tt class="descname">activate</tt><big>(</big><em>plugname</em><big>)</big><a class="headerlink" href="#gozerlib.tests.Tests.activate" title="Permalink to this definition">¶</a></dt>
<dd>activate tests.</dd></dl>

<dl class="method">
<dt id="gozerlib.tests.Tests.add">
<tt class="descname">add</tt><big>(</big><em>execstr</em>, <em>expect=None</em>, <em>descr=''</em>, <em>fakein=''</em><big>)</big><a class="headerlink" href="#gozerlib.tests.Tests.add" title="Permalink to this definition">¶</a></dt>
<dd>add a test.</dd></dl>

<dl class="method">
<dt id="gozerlib.tests.Tests.disable">
<tt class="descname">disable</tt><big>(</big><em>plugname</em><big>)</big><a class="headerlink" href="#gozerlib.tests.Tests.disable" title="Permalink to this definition">¶</a></dt>
<dd>unload tests.</dd></dl>

<dl class="method">
<dt id="gozerlib.tests.Tests.dorun">
<tt class="descname">dorun</tt><big>(</big><em>bot</em>, <em>event</em>, <em>tests</em>, <em>where</em>, <em>plug=None</em><big>)</big><a class="headerlink" href="#gozerlib.tests.Tests.dorun" title="Permalink to this definition">¶</a></dt>
<dd></dd></dl>

<dl class="method">
<dt id="gozerlib.tests.Tests.dotests">
<tt class="descname">dotests</tt><big>(</big><em>bot</em>, <em>event</em>, <em>threaded=False</em>, <em>plug=None</em><big>)</big><a class="headerlink" href="#gozerlib.tests.Tests.dotests" title="Permalink to this definition">¶</a></dt>
<dd>fire all tests.</dd></dl>

<dl class="method">
<dt id="gozerlib.tests.Tests.end">
<tt class="descname">end</tt><big>(</big><em>func</em><big>)</big><a class="headerlink" href="#gozerlib.tests.Tests.end" title="Permalink to this definition">¶</a></dt>
<dd>optional end function.</dd></dl>

<dl class="method">
<dt id="gozerlib.tests.Tests.fakein">
<tt class="descname">fakein</tt><big>(</big><em>execstr</em>, <em>expect=None</em>, <em>descr=''</em><big>)</big><a class="headerlink" href="#gozerlib.tests.Tests.fakein" title="Permalink to this definition">¶</a></dt>
<dd>call bot.fakein().</dd></dl>

<dl class="method">
<dt id="gozerlib.tests.Tests.sleep">
<tt class="descname">sleep</tt><big>(</big><em>seconds</em><big>)</big><a class="headerlink" href="#gozerlib.tests.Tests.sleep" title="Permalink to this definition">¶</a></dt>
<dd>sleep nr of seconds.</dd></dl>

<dl class="method">
<dt id="gozerlib.tests.Tests.start">
<tt class="descname">start</tt><big>(</big><em>func</em><big>)</big><a class="headerlink" href="#gozerlib.tests.Tests.start" title="Permalink to this definition">¶</a></dt>
<dd>optional start function.</dd></dl>

<dl class="method">
<dt id="gozerlib.tests.Tests.unload">
<tt class="descname">unload</tt><big>(</big><em>plugname</em><big>)</big><a class="headerlink" href="#gozerlib.tests.Tests.unload" title="Permalink to this definition">¶</a></dt>
<dd>unload tests.</dd></dl>

</dd></dl>

</div>
<div class="section" id="code">
<h2>code<a class="headerlink" href="#code" title="Permalink to this headline">¶</a></h2>
<div class="highlight-python"><table class="highlighttable"><tr><td class="linenos"><pre>  1
  2
  3
  4
  5
  6
  7
  8
  9
 10
 11
 12
 13
 14
 15
 16
 17
 18
 19
 20
 21
 22
 23
 24
 25
 26
 27
 28
 29
 30
 31
 32
 33
 34
 35
 36
 37
 38
 39
 40
 41
 42
 43
 44
 45
 46
 47
 48
 49
 50
 51
 52
 53
 54
 55
 56
 57
 58
 59
 60
 61
 62
 63
 64
 65
 66
 67
 68
 69
 70
 71
 72
 73
 74
 75
 76
 77
 78
 79
 80
 81
 82
 83
 84
 85
 86
 87
 88
 89
 90
 91
 92
 93
 94
 95
 96
 97
 98
 99
100
101
102
103
104
105
106
107
108
109
110
111
112
113
114
115
116
117
118
119
120
121
122
123
124
125
126
127
128
129
130
131
132
133
134
135
136
137
138
139
140
141
142
143
144
145
146
147
148
149
150
151
152
153
154
155
156
157
158
159
160
161
162
163
164
165
166
167
168
169
170
171
172
173
174
175
176
177
178
179
180
181
182
183
184
185
186
187
188
189
190
191
192
193
194
195
196
197
198
199
200
201
202
203
204
205
206
207
208
209
210
211
212
213
214
215
216
217
218
219
220
221
222
223
224
225
226
227
228
229
230
231
232
233
234
235
236
237
238
239
240
241
242
243
244
245
246
247
248
249
250
251
252
253
254
255
256
257
258
259
260
261
262
263
264
265
266
267
268
269
270
271
272
273
274
275
276
277
278
279
280
281
282
283
284
285
286
287
288
289
290
291
292
293
294
295
296
297
298
299
300
301
302
303
304
305
306
307</pre></td><td class="code"><div class="highlight"><pre><span class="c"># gozerlib/tests.py</span>
<span class="c">#</span>
<span class="c">#</span>

<span class="sd">&quot;&quot;&quot; gozerwave tests framework.  NOT USED RIGHT NOW !! &quot;&quot;&quot;</span>

<span class="c">## gozerlib imports</span>

<span class="kn">from</span> <span class="nn">utils.trace</span> <span class="kn">import</span> <span class="n">calledfrom</span><span class="p">,</span> <span class="n">whichmodule</span>
<span class="kn">from</span> <span class="nn">utils.exception</span> <span class="kn">import</span> <span class="n">exceptionmsg</span>
<span class="kn">from</span> <span class="nn">utils.dol</span> <span class="kn">import</span> <span class="n">Dol</span>
<span class="kn">from</span> <span class="nn">eventbase</span> <span class="kn">import</span> <span class="n">EventBase</span>

<span class="c">## basic imports</span>

<span class="kn">import</span> <span class="nn">logging</span>
<span class="kn">import</span> <span class="nn">sys</span>
<span class="kn">import</span> <span class="nn">re</span>
<span class="kn">import</span> <span class="nn">thread</span>
<span class="kn">import</span> <span class="nn">copy</span>
<span class="kn">import</span> <span class="nn">time</span>
<span class="kn">import</span> <span class="nn">threading</span>
<span class="kn">import</span> <span class="nn">random</span>

<span class="c"># used to copy attributes</span>
<span class="n">cpy</span> <span class="o">=</span> <span class="n">copy</span><span class="o">.</span><span class="n">deepcopy</span>

<span class="k">class</span> <span class="nc">Test</span><span class="p">(</span><span class="nb">object</span><span class="p">):</span>

    <span class="sd">&quot;&quot;&quot; a test object. &quot;&quot;&quot;</span>

    <span class="k">def</span> <span class="nf">__init__</span><span class="p">(</span><span class="bp">self</span><span class="p">,</span> <span class="n">execstring</span><span class="o">=</span><span class="s">&quot;&quot;</span><span class="p">,</span> <span class="n">expect</span><span class="o">=</span><span class="s">&quot;&quot;</span><span class="p">,</span> <span class="n">descr</span><span class="o">=</span><span class="s">&quot;&quot;</span><span class="p">,</span> <span class="n">where</span><span class="o">=</span><span class="s">&quot;&quot;</span><span class="p">,</span> <span class="n">fakein</span><span class="o">=</span><span class="s">&quot;&quot;</span><span class="p">):</span>
        <span class="bp">self</span><span class="o">.</span><span class="n">plugin</span> <span class="o">=</span> <span class="n">calledfrom</span><span class="p">(</span><span class="n">sys</span><span class="o">.</span><span class="n">_getframe</span><span class="p">(</span><span class="mf">1</span><span class="p">))</span>
        <span class="k">if</span> <span class="ow">not</span> <span class="bp">self</span><span class="o">.</span><span class="n">plugin</span><span class="p">:</span>
            <span class="bp">self</span><span class="o">.</span><span class="n">plugin</span> <span class="o">=</span> <span class="n">calledfrom</span><span class="p">(</span><span class="n">sys</span><span class="o">.</span><span class="n">_getframe</span><span class="p">(</span><span class="mf">2</span><span class="p">))</span>
        <span class="bp">self</span><span class="o">.</span><span class="n">descr</span> <span class="o">=</span> <span class="n">cpy</span><span class="p">(</span><span class="n">descr</span><span class="p">)</span>
        <span class="bp">self</span><span class="o">.</span><span class="n">execstring</span> <span class="o">=</span> <span class="n">cpy</span><span class="p">(</span><span class="n">execstring</span><span class="p">)</span>
        <span class="bp">self</span><span class="o">.</span><span class="n">expect</span> <span class="o">=</span> <span class="n">cpy</span><span class="p">(</span><span class="n">expect</span><span class="p">)</span>
        <span class="bp">self</span><span class="o">.</span><span class="n">response</span> <span class="o">=</span> <span class="s">&quot;&quot;</span>
        <span class="bp">self</span><span class="o">.</span><span class="n">groups</span> <span class="o">=</span> <span class="p">[]</span>
        <span class="bp">self</span><span class="o">.</span><span class="n">error</span> <span class="o">=</span> <span class="s">&quot;&quot;</span>
        <span class="bp">self</span><span class="o">.</span><span class="n">where</span> <span class="o">=</span> <span class="n">cpy</span><span class="p">(</span><span class="n">where</span><span class="p">)</span>
        <span class="bp">self</span><span class="o">.</span><span class="n">fakein</span> <span class="o">=</span> <span class="n">cpy</span><span class="p">(</span><span class="n">fakein</span><span class="p">)</span>
        <span class="bp">self</span><span class="o">.</span><span class="n">start</span> <span class="o">=</span> <span class="bp">None</span>
        <span class="bp">self</span><span class="o">.</span><span class="n">end</span> <span class="o">=</span> <span class="bp">None</span>
        <span class="bp">self</span><span class="o">.</span><span class="n">prev</span> <span class="o">=</span> <span class="bp">None</span>
        <span class="bp">self</span><span class="o">.</span><span class="n">activate</span> <span class="o">=</span> <span class="bp">False</span>
        
    <span class="k">def</span> <span class="nf">__str__</span><span class="p">(</span><span class="bp">self</span><span class="p">):</span>
        <span class="k">return</span> <span class="s">&quot;test </span><span class="si">%s</span><span class="s"> (</span><span class="si">%s</span><span class="s">) </span><span class="si">%s</span><span class="s"> ==&gt; </span><span class="si">%s</span><span class="s"> (</span><span class="si">%s</span><span class="s">)&quot;</span> <span class="o">%</span> <span class="p">(</span><span class="bp">self</span><span class="o">.</span><span class="n">descr</span><span class="p">,</span> <span class="bp">self</span><span class="o">.</span><span class="n">where</span><span class="p">,</span> <span class="bp">self</span><span class="o">.</span><span class="n">execstring</span><span class="p">,</span> <span class="bp">self</span><span class="o">.</span><span class="n">response</span><span class="p">,</span> <span class="bp">self</span><span class="o">.</span><span class="n">error</span><span class="p">)</span>

    <span class="k">def</span> <span class="nf">begin</span><span class="p">(</span><span class="bp">self</span><span class="p">):</span>
        <span class="k">if</span> <span class="bp">self</span><span class="o">.</span><span class="n">start</span><span class="p">:</span>
            <span class="bp">self</span><span class="o">.</span><span class="n">start</span><span class="p">()</span>
        <span class="k">return</span> <span class="bp">self</span>

    <span class="k">def</span> <span class="nf">run</span><span class="p">(</span><span class="bp">self</span><span class="p">,</span> <span class="n">bot</span><span class="p">,</span> <span class="n">event</span><span class="p">):</span>

        <span class="sd">&quot;&quot;&quot; run the test on bot with event. &quot;&quot;&quot;</span>

        <span class="k">if</span> <span class="ow">not</span> <span class="bp">self</span><span class="o">.</span><span class="n">activate</span><span class="p">:</span>
            <span class="k">return</span>

        <span class="n">mevent</span> <span class="o">=</span> <span class="n">copy</span><span class="o">.</span><span class="n">deepcopy</span><span class="p">(</span><span class="n">event</span><span class="p">)</span>
        <span class="n">mevent</span><span class="o">.</span><span class="n">onlyqueues</span> <span class="o">=</span> <span class="bp">False</span>
        <span class="n">mevent</span><span class="o">.</span><span class="n">channel</span> <span class="o">=</span> <span class="s">&#39;#dunkbots&#39;</span>
        <span class="n">bot</span><span class="o">.</span><span class="n">userhosts</span><span class="p">[</span><span class="s">&#39;bottest&#39;</span><span class="p">]</span> <span class="o">=</span> <span class="s">&#39;bottest@test&#39;</span>
        <span class="n">bot</span><span class="o">.</span><span class="n">userhosts</span><span class="p">[</span><span class="s">&#39;mtest&#39;</span><span class="p">]</span> <span class="o">=</span> <span class="s">&#39;mekker@test&#39;</span>
        <span class="n">bot</span><span class="o">.</span><span class="n">userhosts</span><span class="p">[</span><span class="s">&#39;exec&#39;</span><span class="p">]</span> <span class="o">=</span> <span class="s">&#39;exec@gozerbot&#39;</span>
        <span class="k">if</span> <span class="s">&#39;exec@gozerbot&#39;</span> <span class="ow">not</span> <span class="ow">in</span> <span class="n">bot</span><span class="o">.</span><span class="n">state</span><span class="p">[</span><span class="s">&#39;joinedchannels&#39;</span><span class="p">]:</span>
            <span class="n">bot</span><span class="o">.</span><span class="n">state</span><span class="p">[</span><span class="s">&#39;joinedchannels&#39;</span><span class="p">]</span><span class="o">.</span><span class="n">append</span><span class="p">(</span><span class="s">&#39;exec@gozerbot&#39;</span><span class="p">)</span>
        <span class="n">bot</span><span class="o">.</span><span class="n">channels</span><span class="p">[</span><span class="s">&#39;exec@gozerbot&#39;</span><span class="p">]</span> <span class="o">=</span> <span class="p">{}</span>
        <span class="k">if</span> <span class="s">&#39;#dunkbots&#39;</span> <span class="ow">not</span> <span class="ow">in</span> <span class="n">bot</span><span class="o">.</span><span class="n">state</span><span class="p">[</span><span class="s">&#39;joinedchannels&#39;</span><span class="p">]:</span>
            <span class="n">bot</span><span class="o">.</span><span class="n">state</span><span class="p">[</span><span class="s">&#39;joinedchannels&#39;</span><span class="p">]</span><span class="o">.</span><span class="n">append</span><span class="p">(</span><span class="s">&#39;#dunkbots&#39;</span><span class="p">)</span>
        <span class="n">bot</span><span class="o">.</span><span class="n">channels</span><span class="p">[</span><span class="s">&#39;#dunkbots&#39;</span><span class="p">]</span> <span class="o">=</span> <span class="p">{</span><span class="s">&#39;cc&#39;</span><span class="p">:</span> <span class="s">&#39;!&#39;</span><span class="p">}</span>
        <span class="bp">self</span><span class="o">.</span><span class="n">error</span> <span class="o">=</span> <span class="s">&quot;&quot;</span>
        <span class="bp">self</span><span class="o">.</span><span class="n">response</span> <span class="o">=</span> <span class="s">&quot;&quot;</span>
        <span class="bp">self</span><span class="o">.</span><span class="n">groups</span> <span class="o">=</span> <span class="p">[]</span>
        <span class="n">origexec</span> <span class="o">=</span> <span class="bp">self</span><span class="o">.</span><span class="n">execstring</span>
        <span class="n">origexpect</span> <span class="o">=</span> <span class="bp">self</span><span class="o">.</span><span class="n">expect</span>
        <span class="k">if</span> <span class="bp">self</span><span class="o">.</span><span class="n">start</span><span class="p">:</span>
            <span class="bp">self</span><span class="o">.</span><span class="n">start</span><span class="p">()</span>
            <span class="k">return</span> <span class="bp">self</span>
        <span class="k">if</span> <span class="bp">self</span><span class="o">.</span><span class="n">end</span><span class="p">:</span>
            <span class="bp">self</span><span class="o">.</span><span class="n">end</span><span class="p">()</span>
            <span class="k">return</span> <span class="bp">self</span>
        <span class="k">if</span> <span class="bp">self</span><span class="o">.</span><span class="n">fakein</span><span class="p">:</span>
            <span class="n">bot</span><span class="o">.</span><span class="n">fakein</span><span class="p">(</span><span class="bp">self</span><span class="o">.</span><span class="n">fakein</span><span class="p">)</span>
            <span class="k">return</span> <span class="bp">self</span>
        <span class="k">if</span> <span class="bp">self</span><span class="o">.</span><span class="n">prev</span> <span class="ow">and</span> <span class="bp">self</span><span class="o">.</span><span class="n">prev</span><span class="o">.</span><span class="n">groups</span><span class="p">:</span>
            <span class="k">try</span><span class="p">:</span>
                <span class="n">execstring</span> <span class="o">=</span> <span class="bp">self</span><span class="o">.</span><span class="n">execstring</span> <span class="o">%</span> <span class="bp">self</span><span class="o">.</span><span class="n">prev</span><span class="o">.</span><span class="n">groups</span>
                <span class="bp">self</span><span class="o">.</span><span class="n">execstring</span> <span class="o">=</span> <span class="n">execstring</span>
            <span class="k">except</span> <span class="ne">TypeError</span><span class="p">:</span>
                <span class="k">pass</span>
            <span class="k">try</span><span class="p">:</span>
                <span class="n">expect</span> <span class="o">=</span> <span class="bp">self</span><span class="o">.</span><span class="n">expect</span> <span class="o">%</span> <span class="bp">self</span><span class="o">.</span><span class="n">prev</span><span class="o">.</span><span class="n">groups</span>
                <span class="bp">self</span><span class="o">.</span><span class="n">expect</span> <span class="o">=</span> <span class="n">expect</span>
            <span class="k">except</span> <span class="ne">TypeError</span><span class="p">:</span>
                <span class="k">pass</span>

        <span class="bp">self</span><span class="o">.</span><span class="n">execstring</span> <span class="o">=</span> <span class="bp">self</span><span class="o">.</span><span class="n">execstring</span><span class="o">.</span><span class="n">replace</span><span class="p">(</span><span class="s">&#39;{{ me }}&#39;</span><span class="p">,</span> <span class="n">mevent</span><span class="o">.</span><span class="n">nick</span><span class="p">)</span>
        <span class="n">mevent</span><span class="o">.</span><span class="n">txt</span> <span class="o">=</span> <span class="n">mevent</span><span class="o">.</span><span class="n">origtxt</span> <span class="o">=</span> <span class="nb">str</span><span class="p">(</span><span class="bp">self</span><span class="o">.</span><span class="n">execstring</span><span class="p">)</span>
        <span class="n">logging</span><span class="o">.</span><span class="n">info</span><span class="p">(</span><span class="s">&#39;(tests) launching </span><span class="si">%s</span><span class="s">&#39;</span> <span class="o">%</span> <span class="n">mevent</span><span class="o">.</span><span class="n">txt</span><span class="p">)</span>

        <span class="kn">from</span> <span class="nn">gozerbot.plugins</span> <span class="kn">import</span> <span class="n">plugins</span>
        <span class="bp">self</span><span class="o">.</span><span class="n">response</span> <span class="o">=</span> <span class="n">plugins</span><span class="o">.</span><span class="n">cmnd</span><span class="p">(</span><span class="n">bot</span><span class="p">,</span> <span class="n">mevent</span><span class="p">)</span>

        <span class="k">if</span> <span class="bp">self</span><span class="o">.</span><span class="n">response</span> <span class="ow">and</span> <span class="bp">self</span><span class="o">.</span><span class="n">expect</span><span class="p">:</span>
            <span class="bp">self</span><span class="o">.</span><span class="n">expect</span> <span class="o">=</span> <span class="bp">self</span><span class="o">.</span><span class="n">expect</span><span class="o">.</span><span class="n">replace</span><span class="p">(</span><span class="s">&#39;{{ me }}&#39;</span><span class="p">,</span> <span class="n">mevent</span><span class="o">.</span><span class="n">nick</span><span class="p">)</span>
            <span class="n">expects</span> <span class="o">=</span> <span class="bp">self</span><span class="o">.</span><span class="n">expect</span><span class="o">.</span><span class="n">split</span><span class="p">(</span><span class="s">&#39;|&#39;</span><span class="p">)</span>
            <span class="n">got</span> <span class="o">=</span> <span class="bp">False</span>
            <span class="k">for</span> <span class="n">expect</span> <span class="ow">in</span> <span class="n">expects</span><span class="p">:</span>
                <span class="n">regex</span> <span class="o">=</span> <span class="n">re</span><span class="o">.</span><span class="n">compile</span><span class="p">(</span><span class="n">expect</span><span class="p">)</span>
                <span class="n">result</span> <span class="o">=</span> <span class="n">regex</span><span class="o">.</span><span class="n">search</span><span class="p">(</span><span class="nb">str</span><span class="p">(</span><span class="bp">self</span><span class="o">.</span><span class="n">response</span><span class="p">))</span>

                <span class="k">if</span> <span class="n">result</span><span class="p">:</span>
                    <span class="n">got</span> <span class="o">=</span> <span class="bp">True</span>
                    <span class="k">break</span>

            <span class="k">if</span> <span class="ow">not</span> <span class="n">got</span><span class="p">:</span>
                <span class="bp">self</span><span class="o">.</span><span class="n">error</span> <span class="o">=</span> <span class="s">&#39;invalid response&#39;</span>
            <span class="k">else</span><span class="p">:</span>
                <span class="bp">self</span><span class="o">.</span><span class="n">groups</span> <span class="o">=</span> <span class="n">result</span><span class="o">.</span><span class="n">groups</span><span class="p">()</span> 

        <span class="bp">self</span><span class="o">.</span><span class="n">execstring</span> <span class="o">=</span> <span class="n">origexec</span>
        <span class="bp">self</span><span class="o">.</span><span class="n">expect</span> <span class="o">=</span> <span class="n">origexpect</span>

        <span class="k">return</span> <span class="bp">self</span>

<span class="k">class</span> <span class="nc">Tests</span><span class="p">(</span><span class="nb">object</span><span class="p">):</span>

    <span class="sd">&quot;&quot;&quot; collection of all tests. &quot;&quot;&quot;</span>

    <span class="k">def</span> <span class="nf">__init__</span><span class="p">(</span><span class="bp">self</span><span class="p">):</span>
        <span class="bp">self</span><span class="o">.</span><span class="n">tests</span> <span class="o">=</span> <span class="p">[]</span>
        <span class="bp">self</span><span class="o">.</span><span class="n">err</span> <span class="o">=</span> <span class="n">Dol</span><span class="p">()</span>
        <span class="bp">self</span><span class="o">.</span><span class="n">toolate</span> <span class="o">=</span> <span class="n">Dol</span><span class="p">()</span>
        <span class="bp">self</span><span class="o">.</span><span class="n">teller</span> <span class="o">=</span> <span class="mf">0</span>

    <span class="k">def</span> <span class="nf">add</span><span class="p">(</span><span class="bp">self</span><span class="p">,</span> <span class="n">execstr</span><span class="p">,</span> <span class="n">expect</span><span class="o">=</span><span class="bp">None</span><span class="p">,</span> <span class="n">descr</span><span class="o">=</span><span class="s">&quot;&quot;</span><span class="p">,</span> <span class="n">fakein</span><span class="o">=</span><span class="s">&quot;&quot;</span><span class="p">):</span>

        <span class="sd">&quot;&quot;&quot; add a test. &quot;&quot;&quot;</span>

        <span class="n">where</span> <span class="o">=</span> <span class="n">whichmodule</span><span class="p">(</span><span class="mf">1</span><span class="p">)</span>
        <span class="k">if</span> <span class="ow">not</span> <span class="n">where</span><span class="p">:</span>
            <span class="n">where</span> <span class="o">=</span> <span class="n">whichmodule</span><span class="p">(</span><span class="mf">2</span><span class="p">)</span>
        <span class="k">if</span> <span class="ow">not</span> <span class="n">where</span><span class="p">:</span>
            <span class="n">where</span> <span class="o">=</span> <span class="n">whichmodule</span><span class="p">(</span><span class="mf">3</span><span class="p">)</span>
        <span class="n">test</span> <span class="o">=</span> <span class="n">Test</span><span class="p">(</span><span class="n">execstr</span><span class="p">,</span> <span class="n">expect</span><span class="p">,</span> <span class="n">descr</span><span class="p">,</span> <span class="n">where</span><span class="p">,</span> <span class="n">fakein</span><span class="p">)</span>
        <span class="bp">self</span><span class="o">.</span><span class="n">tests</span><span class="o">.</span><span class="n">append</span><span class="p">(</span><span class="n">test</span><span class="p">)</span>
        <span class="k">return</span> <span class="bp">self</span>

    <span class="k">def</span> <span class="nf">fakein</span><span class="p">(</span><span class="bp">self</span><span class="p">,</span> <span class="n">execstr</span><span class="p">,</span> <span class="n">expect</span><span class="o">=</span><span class="bp">None</span><span class="p">,</span> <span class="n">descr</span><span class="o">=</span><span class="s">&quot;&quot;</span><span class="p">):</span>

        <span class="sd">&quot;&quot;&quot; call bot.fakein(). &quot;&quot;&quot;</span> 

        <span class="n">where</span> <span class="o">=</span> <span class="n">whichmodule</span><span class="p">(</span><span class="mf">1</span><span class="p">)</span>
        <span class="k">if</span> <span class="ow">not</span> <span class="n">where</span><span class="p">:</span>
            <span class="n">where</span> <span class="o">=</span> <span class="n">whichmodule</span><span class="p">(</span><span class="mf">2</span><span class="p">)</span>
        <span class="k">if</span> <span class="ow">not</span> <span class="n">where</span><span class="p">:</span>
            <span class="n">where</span> <span class="o">=</span> <span class="n">whichmodule</span><span class="p">(</span><span class="mf">3</span><span class="p">)</span>
        <span class="n">test</span> <span class="o">=</span> <span class="n">Test</span><span class="p">(</span><span class="n">execstr</span><span class="p">,</span> <span class="n">expect</span><span class="p">,</span> <span class="n">descr</span><span class="p">,</span> <span class="n">where</span><span class="p">,</span> <span class="n">execstr</span><span class="p">)</span>
        <span class="n">test</span><span class="o">.</span><span class="n">where</span> <span class="o">=</span> <span class="n">where</span>
        <span class="bp">self</span><span class="o">.</span><span class="n">tests</span><span class="o">.</span><span class="n">append</span><span class="p">(</span><span class="n">test</span><span class="p">)</span>
        <span class="k">return</span> <span class="bp">self</span>

    <span class="k">def</span> <span class="nf">start</span><span class="p">(</span><span class="bp">self</span><span class="p">,</span> <span class="n">func</span><span class="p">):</span>

        <span class="sd">&quot;&quot;&quot; optional start function. &quot;&quot;&quot;</span>
        <span class="n">where</span> <span class="o">=</span> <span class="n">whichmodule</span><span class="p">(</span><span class="mf">1</span><span class="p">)</span>
        <span class="k">if</span> <span class="ow">not</span> <span class="n">where</span><span class="p">:</span>
            <span class="n">where</span> <span class="o">=</span> <span class="n">whichmodule</span><span class="p">(</span><span class="mf">2</span><span class="p">)</span>
        <span class="k">if</span> <span class="ow">not</span> <span class="n">where</span><span class="p">:</span>
            <span class="n">where</span> <span class="o">=</span> <span class="n">whichmodule</span><span class="p">(</span><span class="mf">3</span><span class="p">)</span>
        <span class="n">test</span> <span class="o">=</span> <span class="n">Test</span><span class="p">()</span>
        <span class="n">test</span><span class="o">.</span><span class="n">start</span> <span class="o">=</span> <span class="n">func</span>
        <span class="n">test</span><span class="o">.</span><span class="n">where</span> <span class="o">=</span> <span class="n">where</span>
        <span class="n">test</span><span class="o">.</span><span class="n">execstring</span> <span class="o">=</span> <span class="s">&#39;start&#39;</span>
        <span class="bp">self</span><span class="o">.</span><span class="n">tests</span><span class="o">.</span><span class="n">append</span><span class="p">(</span><span class="n">test</span><span class="p">)</span>
        <span class="k">return</span> <span class="bp">self</span>

    <span class="k">def</span> <span class="nf">end</span><span class="p">(</span><span class="bp">self</span><span class="p">,</span> <span class="n">func</span><span class="p">):</span>

        <span class="sd">&quot;&quot;&quot; optional end function. &quot;&quot;&quot;</span>

        <span class="n">where</span> <span class="o">=</span> <span class="n">whichmodule</span><span class="p">(</span><span class="mf">1</span><span class="p">)</span>
        <span class="k">if</span> <span class="ow">not</span> <span class="n">where</span><span class="p">:</span>
            <span class="n">where</span> <span class="o">=</span> <span class="n">whichmodule</span><span class="p">(</span><span class="mf">2</span><span class="p">)</span>
        <span class="k">if</span> <span class="ow">not</span> <span class="n">where</span><span class="p">:</span>
            <span class="n">where</span> <span class="o">=</span> <span class="n">whichmodule</span><span class="p">(</span><span class="mf">3</span><span class="p">)</span>
        <span class="n">test</span> <span class="o">=</span> <span class="n">Test</span><span class="p">()</span>
        <span class="n">test</span><span class="o">.</span><span class="n">end</span> <span class="o">=</span> <span class="n">func</span>
        <span class="n">test</span><span class="o">.</span><span class="n">where</span> <span class="o">=</span> <span class="n">where</span>
        <span class="n">test</span><span class="o">.</span><span class="n">execstring</span> <span class="o">=</span> <span class="s">&#39;end&#39;</span>
        <span class="bp">self</span><span class="o">.</span><span class="n">tests</span><span class="o">.</span><span class="n">append</span><span class="p">(</span><span class="n">test</span><span class="p">)</span>
        <span class="k">return</span> <span class="bp">self</span>

    <span class="k">def</span> <span class="nf">unload</span><span class="p">(</span><span class="bp">self</span><span class="p">,</span> <span class="n">plugname</span><span class="p">):</span>

        <span class="sd">&quot;&quot;&quot; unload tests. &quot;&quot;&quot;</span>

        <span class="k">for</span> <span class="n">i</span> <span class="ow">in</span> <span class="nb">range</span><span class="p">(</span><span class="nb">len</span><span class="p">(</span><span class="bp">self</span><span class="o">.</span><span class="n">tests</span><span class="p">)</span><span class="o">-</span><span class="mf">1</span><span class="p">,</span> <span class="o">-</span><span class="mf">1</span><span class="p">,</span> <span class="o">-</span><span class="mf">1</span><span class="p">):</span>
            <span class="k">if</span> <span class="bp">self</span><span class="o">.</span><span class="n">tests</span><span class="p">[</span><span class="n">i</span><span class="p">]</span><span class="o">.</span><span class="n">plugin</span> <span class="o">==</span> <span class="n">plugname</span><span class="p">:</span>
                <span class="k">del</span> <span class="bp">self</span><span class="o">.</span><span class="n">tests</span><span class="p">[</span><span class="n">i</span><span class="p">]</span>

        <span class="k">return</span> <span class="bp">self</span>

    <span class="k">def</span> <span class="nf">activate</span><span class="p">(</span><span class="bp">self</span><span class="p">,</span> <span class="n">plugname</span><span class="p">):</span>

        <span class="sd">&quot;&quot;&quot; activate tests. &quot;&quot;&quot;</span>

        <span class="k">for</span> <span class="n">i</span> <span class="ow">in</span> <span class="nb">range</span><span class="p">(</span><span class="nb">len</span><span class="p">(</span><span class="bp">self</span><span class="o">.</span><span class="n">tests</span><span class="p">)</span><span class="o">-</span><span class="mf">1</span><span class="p">,</span> <span class="o">-</span><span class="mf">1</span><span class="p">,</span> <span class="o">-</span><span class="mf">1</span><span class="p">):</span>
            <span class="k">if</span> <span class="bp">self</span><span class="o">.</span><span class="n">tests</span><span class="p">[</span><span class="n">i</span><span class="p">]</span><span class="o">.</span><span class="n">plugin</span> <span class="o">==</span> <span class="n">plugname</span><span class="p">:</span>
                <span class="bp">self</span><span class="o">.</span><span class="n">tests</span><span class="p">[</span><span class="n">i</span><span class="p">]</span><span class="o">.</span><span class="n">activate</span> <span class="o">=</span> <span class="bp">True</span>

        <span class="k">return</span> <span class="bp">self</span>

    <span class="k">def</span> <span class="nf">disable</span><span class="p">(</span><span class="bp">self</span><span class="p">,</span> <span class="n">plugname</span><span class="p">):</span>

        <span class="sd">&quot;&quot;&quot; unload tests. &quot;&quot;&quot;</span>

        <span class="k">for</span> <span class="n">i</span> <span class="ow">in</span> <span class="nb">range</span><span class="p">(</span><span class="nb">len</span><span class="p">(</span><span class="bp">self</span><span class="o">.</span><span class="n">tests</span><span class="p">)</span><span class="o">-</span><span class="mf">1</span><span class="p">,</span> <span class="o">-</span><span class="mf">1</span><span class="p">,</span> <span class="o">-</span><span class="mf">1</span><span class="p">):</span>
            <span class="k">if</span> <span class="bp">self</span><span class="o">.</span><span class="n">tests</span><span class="p">[</span><span class="n">i</span><span class="p">]</span><span class="o">.</span><span class="n">plugin</span> <span class="o">==</span> <span class="n">plugname</span><span class="p">:</span>
                <span class="bp">self</span><span class="o">.</span><span class="n">tests</span><span class="p">[</span><span class="n">i</span><span class="p">]</span><span class="o">.</span><span class="n">activate</span> <span class="o">=</span> <span class="bp">False</span>

        <span class="k">return</span> <span class="bp">self</span>

    <span class="k">def</span> <span class="nf">dorun</span><span class="p">(</span><span class="bp">self</span><span class="p">,</span> <span class="n">bot</span><span class="p">,</span> <span class="n">event</span><span class="p">,</span> <span class="n">tests</span><span class="p">,</span> <span class="n">where</span><span class="p">,</span> <span class="n">plug</span><span class="o">=</span><span class="bp">None</span><span class="p">):</span>
        <span class="n">teller</span> <span class="o">=</span> <span class="mf">0</span>
        <span class="n">err</span> <span class="o">=</span> <span class="p">{}</span>
        <span class="n">toolate</span> <span class="o">=</span> <span class="p">[]</span>
        <span class="n">prev</span> <span class="o">=</span> <span class="bp">None</span>
        <span class="k">for</span> <span class="n">test</span> <span class="ow">in</span> <span class="n">tests</span><span class="p">:</span>
            <span class="k">if</span> <span class="n">event</span><span class="o">.</span><span class="n">rest</span> <span class="ow">and</span> <span class="n">event</span><span class="o">.</span><span class="n">rest</span> <span class="ow">not</span> <span class="ow">in</span> <span class="n">test</span><span class="o">.</span><span class="n">plugin</span><span class="p">:</span>
                <span class="k">continue</span>
            <span class="k">if</span> <span class="n">prev</span><span class="p">:</span> 
                <span class="n">test</span><span class="o">.</span><span class="n">prev</span> <span class="o">=</span> <span class="n">prev</span>
            <span class="n">prev</span> <span class="o">=</span> <span class="n">test</span>
            <span class="k">if</span> <span class="n">test</span><span class="o">.</span><span class="n">expect</span><span class="p">:</span>
                <span class="n">teller</span> <span class="o">+=</span> <span class="mf">1</span>
            <span class="k">try</span><span class="p">:</span>
                <span class="n">starttime</span> <span class="o">=</span> <span class="n">time</span><span class="o">.</span><span class="n">time</span><span class="p">()</span>
                <span class="bp">self</span><span class="o">.</span><span class="n">teller</span> <span class="o">+=</span> <span class="mf">1</span>
                <span class="n">e</span> <span class="o">=</span> <span class="n">copy</span><span class="o">.</span><span class="n">deepcopy</span><span class="p">(</span><span class="n">event</span><span class="p">)</span>
                <span class="n">result</span> <span class="o">=</span> <span class="n">test</span><span class="o">.</span><span class="n">run</span><span class="p">(</span><span class="n">bot</span><span class="p">,</span> <span class="n">e</span><span class="p">)</span>
                <span class="n">finished</span> <span class="o">=</span> <span class="n">time</span><span class="o">.</span><span class="n">time</span><span class="p">()</span>
                <span class="k">if</span> <span class="n">finished</span> <span class="o">-</span> <span class="n">starttime</span> <span class="o">&gt;</span> <span class="mf">10</span><span class="p">:</span>
                    <span class="bp">self</span><span class="o">.</span><span class="n">toolate</span><span class="p">[</span><span class="n">test</span><span class="o">.</span><span class="n">execstring</span><span class="p">]</span> <span class="o">=</span> <span class="n">finished</span> <span class="o">-</span> <span class="n">starttime</span>
                <span class="k">if</span> <span class="ow">not</span> <span class="n">result</span><span class="p">:</span>
                    <span class="k">continue</span>
                <span class="k">if</span> <span class="ow">not</span> <span class="n">result</span><span class="o">.</span><span class="n">error</span><span class="p">:</span>
                    <span class="n">event</span><span class="o">.</span><span class="n">reply</span><span class="p">(</span><span class="s">&quot;OK </span><span class="si">%s</span><span class="s"> (</span><span class="si">%s</span><span class="s">) ==&gt; </span><span class="si">%s</span><span class="s">&quot;</span> <span class="o">%</span> <span class="p">(</span><span class="n">test</span><span class="o">.</span><span class="n">execstring</span><span class="p">,</span> <span class="n">test</span><span class="o">.</span><span class="n">where</span><span class="p">,</span> <span class="n">result</span><span class="o">.</span><span class="n">response</span><span class="p">))</span>
                <span class="k">else</span><span class="p">:</span>
                    <span class="bp">self</span><span class="o">.</span><span class="n">err</span><span class="p">[</span><span class="n">test</span><span class="o">.</span><span class="n">execstring</span><span class="p">]</span> <span class="o">=</span> <span class="n">test</span>
                    <span class="n">event</span><span class="o">.</span><span class="n">reply</span><span class="p">(</span><span class="s">&#39;ERROR </span><span class="si">%s</span><span class="s"> (</span><span class="si">%s</span><span class="s">): </span><span class="si">%s</span><span class="s"> ==&gt; </span><span class="si">%s</span><span class="s"> (</span><span class="si">%s</span><span class="s">)&#39;</span> <span class="o">%</span> <span class="p">(</span><span class="n">test</span><span class="o">.</span><span class="n">error</span><span class="p">,</span> <span class="n">test</span><span class="o">.</span><span class="n">where</span><span class="p">,</span> <span class="n">test</span><span class="o">.</span><span class="n">execstring</span><span class="p">,</span> <span class="n">test</span><span class="o">.</span><span class="n">response</span><span class="p">,</span> <span class="n">test</span><span class="o">.</span><span class="n">expect</span><span class="p">))</span>
            <span class="k">except</span> <span class="ne">Exception</span><span class="p">,</span> <span class="n">ex</span><span class="p">:</span>
                <span class="n">test</span><span class="o">.</span><span class="n">error</span> <span class="o">=</span> <span class="n">exceptionmsg</span><span class="p">()</span>
                <span class="bp">self</span><span class="o">.</span><span class="n">err</span><span class="p">[</span><span class="n">test</span><span class="o">.</span><span class="n">execstring</span><span class="p">]</span> <span class="o">=</span> <span class="n">test</span>
                <span class="n">event</span><span class="o">.</span><span class="n">reply</span><span class="p">(</span><span class="n">test</span><span class="o">.</span><span class="n">error</span><span class="p">)</span>

        <span class="k">return</span> <span class="bp">self</span>

    <span class="k">def</span> <span class="nf">dotests</span><span class="p">(</span><span class="bp">self</span><span class="p">,</span> <span class="n">bot</span><span class="p">,</span> <span class="n">event</span><span class="p">,</span> <span class="n">threaded</span><span class="o">=</span><span class="bp">False</span><span class="p">,</span> <span class="n">plug</span><span class="o">=</span><span class="bp">None</span><span class="p">):</span>

        <span class="sd">&quot;&quot;&quot; fire all tests. &quot;&quot;&quot;</span>

        <span class="c">#event = EventBase(eventin)</span>
        <span class="n">groups</span> <span class="o">=</span> <span class="n">Dol</span><span class="p">()</span>

        <span class="k">for</span> <span class="n">test</span> <span class="ow">in</span> <span class="bp">self</span><span class="o">.</span><span class="n">tests</span><span class="p">:</span>
            <span class="n">groups</span><span class="o">.</span><span class="n">add</span><span class="p">(</span><span class="n">test</span><span class="o">.</span><span class="n">where</span><span class="p">,</span> <span class="n">test</span><span class="p">)</span>

        <span class="n">threads</span> <span class="o">=</span> <span class="p">[]</span>
        <span class="n">testlist</span> <span class="o">=</span> <span class="p">[]</span>

        <span class="k">for</span> <span class="n">where</span><span class="p">,</span> <span class="n">tests</span> <span class="ow">in</span> <span class="n">groups</span><span class="o">.</span><span class="n">iteritems</span><span class="p">():</span>
            <span class="n">testlist</span><span class="o">.</span><span class="n">append</span><span class="p">((</span><span class="n">where</span><span class="p">,</span> <span class="n">tests</span><span class="p">))</span>

        <span class="n">random</span><span class="o">.</span><span class="n">shuffle</span><span class="p">(</span><span class="n">testlist</span><span class="p">)</span>

        <span class="k">for</span> <span class="n">t</span> <span class="ow">in</span> <span class="n">testlist</span><span class="p">:</span>
            <span class="n">where</span><span class="p">,</span> <span class="n">tests</span> <span class="o">=</span> <span class="n">t</span>
            <span class="k">if</span> <span class="n">plug</span> <span class="ow">and</span> <span class="n">plug</span> <span class="ow">not</span> <span class="ow">in</span> <span class="n">where</span><span class="p">:</span>
                <span class="k">continue</span>
            <span class="n">event</span><span class="o">.</span><span class="n">reply</span><span class="p">(</span><span class="s">&quot;running tests on </span><span class="si">%s</span><span class="s">&quot;</span> <span class="o">%</span> <span class="n">where</span><span class="p">)</span>
            <span class="bp">self</span><span class="o">.</span><span class="n">dorun</span><span class="p">(</span><span class="n">bot</span><span class="p">,</span> <span class="n">event</span><span class="p">,</span> <span class="n">tests</span><span class="p">,</span> <span class="n">where</span><span class="p">,</span> <span class="n">plug</span><span class="p">)</span>

        <span class="n">event</span><span class="o">.</span><span class="n">done</span><span class="p">()</span>

    <span class="k">def</span> <span class="nf">sleep</span><span class="p">(</span><span class="bp">self</span><span class="p">,</span> <span class="n">seconds</span><span class="p">):</span>

        <span class="sd">&quot;&quot;&quot; sleep nr of seconds. &quot;&quot;&quot;</span>

        <span class="n">time</span><span class="o">.</span><span class="n">sleep</span><span class="p">(</span><span class="n">seconds</span><span class="p">)</span>
        <span class="k">return</span> <span class="bp">self</span>

<span class="c">## INIT SECTION</span>

<span class="c"># expect is for examples</span>

<span class="n">expect</span> <span class="o">=</span> <span class="p">{}</span>

<span class="c"># the tests</span>
<span class="n">tests</span> <span class="o">=</span> <span class="n">Tests</span><span class="p">()</span>

<span class="c">## END INIT</span>
</pre></div>
</td></tr></table></div>
</div>
</div>


          </div>
        </div>
      </div>
      <div class="sphinxsidebar">
        <div class="sphinxsidebarwrapper">
            <h3><a href="../index.html">Table Of Contents</a></h3>
            <ul>
<li><a class="reference external" href="">tests</a><ul>
<li><a class="reference external" href="#module-gozerlib.tests">description</a></li>
<li><a class="reference external" href="#code">code</a></li>
</ul>
</li>
</ul>

            <h4>Previous topic</h4>
            <p class="topless"><a href="plugins.html"
                                  title="previous chapter">plugins</a></p>
            <h4>Next topic</h4>
            <p class="topless"><a href="users.html"
                                  title="next chapter">users</a></p>
            <h3>This Page</h3>
            <ul class="this-page-menu">
              <li><a href="../_sources/gozerlib/tests.txt"
                     rel="nofollow">Show Source</a></li>
            </ul>
          <div id="searchbox" style="display: none">
            <h3>Quick search</h3>
              <form class="search" action="../search.html" method="get">
                <input type="text" name="q" size="18" />
                <input type="submit" value="Go" />
                <input type="hidden" name="check_keywords" value="yes" />
                <input type="hidden" name="area" value="default" />
              </form>
              <p class="searchtip" style="font-size: 90%">
              Enter search terms or a module, class or function name.
              </p>
          </div>
          <script type="text/javascript">$('#searchbox').show(0);</script>
        </div>
      </div>
      <div class="clearer"></div>
    </div>
    <div class="related">
      <h3>Navigation</h3>
      <ul>
        <li class="right" style="margin-right: 10px">
          <a href="../genindex.html" title="General Index"
             >index</a></li>
        <li class="right" >
          <a href="../modindex.html" title="Global Module Index"
             >modules</a> |</li>
        <li class="right" >
          <a href="users.html" title="users"
             >next</a> |</li>
        <li class="right" >
          <a href="plugins.html" title="plugins"
             >previous</a> |</li>
        <li><a href="../index.html">GOZERWAVE v0.1 BETA documentation</a> &raquo;</li> 
      </ul>
    </div>
    <div class="footer">
      &copy; Copyright 2009, Bart Thate.
      Last updated on Nov 14, 2009.
      Created using <a href="http://sphinx.pocoo.org/">Sphinx</a> 0.6.3.
    </div>
  </body>
</html>